package org.example.projecttwo.entity.user;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.FieldFill;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户统计数据表
 * </p>
 *
 * @author nn
 * @since 2025-11-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user_statistics")
@Schema(name="UserStatistics对象", description="用户统计数据表")
public class UserStatistics implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "用户ID")
    @TableId(value = "user_id", type = IdType.ASSIGN_ID)
    private Long userId;

    @Schema(description = "文章总数")
    @TableField("article_count")
    private Integer articleCount;

    @Schema(description = "新闻总数")
    @TableField("news_count")
    private Integer newsCount;

    @Schema(description = "获赞总数")
    @TableField("like_count")
    private Integer likeCount;

    @Schema(description = "被收藏总数")
    @TableField("collect_count")
    private Integer collectCount;

    @Schema(description = "连续签到天数")
    @TableField("continuous_checkin_days")
    private Integer continuousCheckinDays;

    @Schema(description = "最后签到日期")
    @TableField("last_checkin_date")
    private LocalDate lastCheckinDate;

    @Schema(description = "累计签到总天数")
    @TableField("total_checkin_days")
    private Integer totalCheckinDays;

    @Schema(description = "最后统计更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


}